package com.chag.app.biz.dao.gen;

import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface Resume2JobMapper {
    int countByExample(Resume2JobCriteria example);

    int deleteByExample(Resume2JobCriteria example);

    @Delete({
        "delete from RESUME_2_JOB",
        "where RESUME_2_JOB_ID = #{resume2JobId,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer resume2JobId);

    @Insert({
        "insert into RESUME_2_JOB (RESUME_2_JOB_ID, RESUME_ID, ",
        "JOB_ID, STATE_TIME, ",
        "STATE)",
        "values (#{resume2JobId,jdbcType=INTEGER}, #{resumeId,jdbcType=INTEGER}, ",
        "#{jobId,jdbcType=INTEGER}, #{stateTime,jdbcType=TIMESTAMP}, ",
        "#{state,jdbcType=VARCHAR})"
    })
    int insert(Resume2Job record);

    int insertSelective(Resume2Job record);

    List<Resume2Job> selectByExample(Resume2JobCriteria example);

    @Select({
        "select",
        "RESUME_2_JOB_ID, RESUME_ID, JOB_ID, STATE_TIME, STATE",
        "from RESUME_2_JOB",
        "where RESUME_2_JOB_ID = #{resume2JobId,jdbcType=INTEGER}"
    })
    @ResultMap("BaseResultMap")
    Resume2Job selectByPrimaryKey(Integer resume2JobId);

    int updateByExampleSelective(@Param("record") Resume2Job record, @Param("example") Resume2JobCriteria example);

    int updateByExample(@Param("record") Resume2Job record, @Param("example") Resume2JobCriteria example);

    int updateByPrimaryKeySelective(Resume2Job record);

    @Update({
        "update RESUME_2_JOB",
        "set RESUME_ID = #{resumeId,jdbcType=INTEGER},",
          "JOB_ID = #{jobId,jdbcType=INTEGER},",
          "STATE_TIME = #{stateTime,jdbcType=TIMESTAMP},",
          "STATE = #{state,jdbcType=VARCHAR}",
        "where RESUME_2_JOB_ID = #{resume2JobId,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(Resume2Job record);
}